﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>市信息管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="/hdocs/css/cms.css" rel="stylesheet" type="text/css" />
<script src="/hdocs/js/cms.js" type="text/javascript"></script>
<script src="/hdocs/js/prototype.js" type="text/javascript"></script>
</head>
<body style="padding: 10px">
	<form id="mainForm" name="mainForm" action="/region/cityAdd.jsp"
		method="post">
		<table class="formlist">
			<tr>
				<th width="80px">所属省:</th>
				<td>
					<select name="province" id="province">
						<option value="">---请选择---</option> 
						#foreach($p in $provinceList)
						<option value="$p.name" #if($p.name==$!province) selected #end>$p.name</option>
						#end
					</select>
				</td>
			</tr>
			<tr>
				<th colspan="2">市名称:</th>
			</tr>
			<tr>
				<td colspan="2">
					<textarea name="citys" id="citys" cols="50" rows="15"></textarea>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<p style="color: red">注：每行输入一个市名称，以回车键进行分割。</p>
				</td>
			</tr>
			<tr>
				<td style="text-align: right" colspan="2">
					<input type="button" class="cms_button" onclick="submitFrom()" value="提交" /> 
					<input type="button" class="cms_button" onclick="resetForm()" value="重置" />
					<input type="button" class="cms_button" onclick="window.location.href='/region/cityQuery.jsp'" value="城市列表" />
				</td>
			</tr>
		</table>
	</form>
</body>
</html>
<script type="text/javascript">
<!--
	function submitFrom() {
		var province = document.getElementById("province");
		if (province.value == null || province.value == "") {
			alert("请选择省份！");
			return;
		}
		var citys = document.getElementById("citys");
		if (citys.value == null || citys.value == "") {
			alert("请填写城市！");
			return;
		}
		var mainForm = document.getElementById("mainForm");
		mainForm.submit();
	}

	function resetForm() {
		document.getElementById("province").value="";
		document.getElementById("citys").value="";
	}
//-->
</script>
